<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <title>系统属性</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta name="author" content="飞啊飘啊">
	<meta name="hashcode" content="-1092200007">
	
	<script>window.duteTag="lz";</script>
	<script type="text/javascript" src="/admin/js/dute-1.0.js"></script>
	<script type="text/javascript" src="/admin/js/jquery-1.7.1.min.js"></script>
	
	<script type="text/javascript" src="/admin/js/lazy3q.ui.js"></script>
	<script>
		document.write('<link rel="stylesheet" type="text/css" href="/admin//css/'+($.cookie('theme')||'elegant')+'/lazy3q.ui.css" /> ');
	</script>
	
	<script type="text/javascript" src="/admin/js/jquery-ui-1.10.2.custom.min.js"></script>
	
	<!-- 用户自定义js(懒加载) -->
	<script type="text/javascript" src="/admin/js/define.js"></script>
	<!-- 用户自定义css样式 -->
	<link rel="stylesheet" type="text/css" href="/admin/css/define.css"/>
	<!-- icon font -->
  	<link rel="stylesheet" href="/admin/css/iconfont.css">
	
	
	
	<script type="text/javascript">
		window.basePath="/";
		window.hashcode = "-1092200007";
	</script>
		
	<!-- 感谢kindeditor出品的在线HTML编辑控件 -->
	<script type="text/javascript" charset="utf-8" src="/admin/js/kindeditor/kindeditor.js"></script>
		
	<!-- 感谢My97DatePicker出品的时间控件 -->
	<script language="javascript" type="text/javascript" src="/admin/js/My97DatePicker/WdatePicker.js"></script>
	
	<!------------------------VIEW_HTML_HEAD------------------------>
	<!------------------------VIEW_HTML_HEAD------------------------>	
	
</head>
<script>
Page({
  data:{
    
  },
  onLoad: function(options) {
  	var THIS = this;
  	THIS.setData(options);
  	$.getAjax("property.get.do",options,function(protocol){
  		if(protocol.message){
  			$.toast(protocol.message);
  		}
  		document.title={
  			 "insert":"创建系统属性"
  			,"inport":"导入系统属性"
  			,"update":"修改系统属性"
  			,"detail":"系统属性详情"
  		}[options.edittype];
  		THIS.setData(protocol.data); 
  		/******************VIEW_HTML_SET_DATA******************/
  		/******************VIEW_HTML_SET_DATA******************/
  	});
  }
});
</script>
<script>
window["lzFlashUrl"]=top.lzFlashUrl||"/admin/flash/";
window["uploadUrl"]=top.uploadUrl||"/admin/upload.do";

$(function(){
		 
	$("#propertyForm").form({
		"":function(){}
		,"srvProperty.spId":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"srvProperty.spName":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "名称不能为空";
			}
		}
		,"srvProperty.spParent":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"srvProperty.spFlag":function(el){
			if(el.value.length>64 && el.value.indexOf("[*]")==-1)
				return "标识最大长度为64个字符";
			if(jQuery.trim(el.value)!=""){
				var protocol = $.getAjax("property.query.do",{exists:true,spFlag:el.value});
				if(protocol.success && protocol.data.list && protocol.data.list.length>0){
					if(!$("#spId").val() || protocol.data.list[0].key!=$("#spId").val())
						return "标识已存在";						
				}
			}
		}
		,"srvProperty.spNumber":function(el){
				if(el.value.length>10)
					return "数字太大了";
					 var pattern = /^-?(0|[1-9][0-9]*)?$/;
					 if(!pattern.test(el.value))
						return "请输入正确格式的数字";			
		}
		,"srvProperty.spValue":function(el){
			if(el.value.length>256 && el.value.indexOf("[*]")==-1)
				return "串值最大长度为256个字符";
		}
		,"srvProperty.spText":function(el){
			if(el.value.length>65535 && el.value.indexOf("[*]")==-1)
				return "文本最大长度为65535个字符";
		}
		,"srvProperty.spStatus":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "请选择状态";
			}
		}
	},function(){
		/******************************LAZY3Q_FORM_VALIDATE******************************/
		/******************************LAZY3Q_FORM_VALIDATE******************************/
	});		
});
</script>

<body style="display:none;">



<!------------------------VIEW_HTML_TOP------------------------>
<!------------------------VIEW_HTML_TOP------------------------>


<form enctype="{{inports!=null?'multipart/form-data':''}}" lz:if="{{edittype=='insert'||edittype=='update'||edittype=='detail'||edittype=='any'||edittype=='inport'}}" class="form editform edittype_{{edittype}}" ref="SrvProperty" id="propertyForm" name="propertyForm" target="jsoniframe" action="property.{{edittype=='any'?'update':edittype}}.do" method="post">
	<div class="head"></div>
	<div class="body">
		<div class="content">
			<div lz:if="{{edittype!='detail'}}" class="prompt">
				温馨提示：请仔细填写系统属性相关信息，<span class="extrude">"*" 为必填选项。</span>
			</div>
			<br/>
			<lz:block lz:if="{{message}}">
			<br/>
			<center>
				<font color="red"><h4>{{message}}</h4></font>
			</center>
			<br/>
			</lz:block>
			<input type="hidden" value="{{complete}}" name="complete" id="complete" />
			<input type="hidden" value="{{ids}}" name="ids" id="ids" />
			<textarea name="PARAMS" id="PARAMS" style="display:none">{{PARAMS}}</textarea>
			
			
			<lz:block lz:if="{{inports}}">
			  <div class="line"></div>
			  <dl style="width:98%;">
			  	<dt>Excel文件:</dt>
			  	<dd>
			  		<input type="hidden" value="{{inports}}" name="inports" id="inports" />
			  		<input type="hidden" value="{{inport$}}" name="inport$" id="inport$" />
			  		<input name="file" name="file" type="file"/>
			  		<b>*</b>
			  		<div>
						请上传excel文件，表格列依次为：[{{inport$}}]，excel表格第一行为列名称，将不作为上传数据行
					</div>
			  	</dd>
			  </dl>
			  <div class="line"></div>
			</lz:block>
	{{lz.set("spId_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"spId"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"spId"))))}}
	{{lz.set("spId_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$spId}}
	<dl lz:if="{{spId_editable||spId_readonly}}" class="spId hidden " major  ref="spId">
		<dt>编　　号:</dt>
		<dd lz:if="{{spId_editable}}" input="hidden">
			<lz:block lz:if="{{srvProperty$spId}}">
				{{srvProperty$spId}}
			</lz:block>
			<lz:block lz:if="{{!srvProperty$spId}}">
			<input type="hidden" value="{{lz.htm(srvProperty.spId)}}" name="srvProperty.spId" id="spId" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{spId_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="spId">{{srvProperty.spId}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvProperty.spId$||srvProperty.spId)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$spId}}
	{{lz.set("spName_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"spName"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"spName"))))}}
	{{lz.set("spName_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$spName}}
	<dl lz:if="{{spName_editable||spName_readonly}}" class="spName  " major  ref="spName">
		<dt>名　　称:</dt>
		<dd lz:if="{{spName_editable}}" input="text">
			<lz:block lz:if="{{srvProperty$spName}}">
				{{srvProperty$spName}}
			</lz:block>
			<lz:block lz:if="{{!srvProperty$spName}}">
		 	<input type="text" class="input narrow"   name="srvProperty.spName" id="spName"  value="{{lz.htm(srvProperty.spName)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>属性名称，如html中select的option的text内容</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{spName_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="spName">{{srvProperty.spName}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvProperty.spName$||srvProperty.spName)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$spName}}
	{{lz.set("spParent_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"spParent"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"spParent"))))}}
	{{lz.set("spParent_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$spParent}}
	<dl lz:if="{{spParent_editable||spParent_readonly}}" class="spParent  " major  ref="spParent">
		<dt>类　　型:</dt>
		<dd lz:if="{{spParent_editable}}" input="label">
			<lz:block lz:if="{{srvProperty$spParent}}">
				{{srvProperty$spParent}}
			</lz:block>
			<lz:block lz:if="{{!srvProperty$spParent}}">
			<input type="hidden" name="srvProperty.spParent" id="srvProperty.spParent"  value="{{srvProperty.spParent||'0'}}"/>
			{{srvProperty.spParent$||srvProperty.spParent||"[无]"}}
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{spParent_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class="" name="srvProperty.spParent" style="display:none;" id="spParent">{{srvProperty.spParent}}</textarea>
		 		<span>
		 	
			 <a href="javascript:void(0);" onclick="window.href('/admin/configurator/property.details.html?key=srvProperty.spParent}')">
			 {{lz.html(srvProperty.spParent$||srvProperty.spParent)}}</a>
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$spParent}}
	{{lz.set("spFlag_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"spFlag"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"spFlag"))))}}
	{{lz.set("spFlag_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$spFlag}}
	<dl lz:if="{{spFlag_editable||spFlag_readonly}}" class="ribs spFlag   mider" major  ref="spFlag">
		<dt>标　　识:</dt>
		<dd lz:if="{{spFlag_editable}}" input="text">
			<lz:block lz:if="{{srvProperty$spFlag}}">
				{{srvProperty$spFlag}}
			</lz:block>
			<lz:block lz:if="{{!srvProperty$spFlag}}">
		 	<input type="text" class="input mide"  maxlength="64" name="srvProperty.spFlag" id="spFlag"  value="{{lz.htm(srvProperty.spFlag)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>程序变量命名规则格式</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{spFlag_readonly}}">
		 	<div class="state-input mide">
		 		<textarea class=""  style="display:none;" id="spFlag">{{srvProperty.spFlag}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvProperty.spFlag$||srvProperty.spFlag)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$spFlag}}
	{{lz.set("spNumber_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"spNumber"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"spNumber"))))}}
	{{lz.set("spNumber_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$spNumber}}
	<dl lz:if="{{spNumber_editable||spNumber_readonly}}" class="ribs spNumber  " minor  ref="spNumber">
		<dt>数　　值:</dt>
		<dd lz:if="{{spNumber_editable}}" input="number">
			<lz:block lz:if="{{srvProperty$spNumber}}">
				{{srvProperty$spNumber}}
			</lz:block>
			<lz:block lz:if="{{!srvProperty$spNumber}}">
			<input onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="srvProperty.spNumber" id="spNumber"  value="{{lz.htm(srvProperty.spNumber)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入系统属性的数值</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{spNumber_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="spNumber">{{srvProperty.spNumber}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvProperty.spNumber$||srvProperty.spNumber)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$spNumber}}
	{{lz.set("spValue_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"spValue"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"spValue"))))}}
	{{lz.set("spValue_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$spValue}}
	<dl lz:if="{{spValue_editable||spValue_readonly}}" class="ribs spValue   mider" minor  ref="spValue">
		<dt>串　　值:</dt>
		<dd lz:if="{{spValue_editable}}" input="text">
			<lz:block lz:if="{{srvProperty$spValue}}">
				{{srvProperty$spValue}}
			</lz:block>
			<lz:block lz:if="{{!srvProperty$spValue}}">
		 	<input type="text" class="input mide"  maxlength="256" name="srvProperty.spValue" id="spValue"  value="{{lz.htm(srvProperty.spValue)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入系统属性的串值</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{spValue_readonly}}">
		 	<div class="state-input mide">
		 		<textarea class=""  style="display:none;" id="spValue">{{srvProperty.spValue}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvProperty.spValue$||srvProperty.spValue)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$spValue}}
	{{lz.set("spText_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"spText"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"spText"))))}}
	{{lz.set("spText_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$spText}}
	<dl lz:if="{{spText_editable||spText_readonly}}" class="ribs spText   wider" minor  ref="spText">
		<dt>文　　本:</dt>
		<dd lz:if="{{spText_editable}}" input="textarea">
			<lz:block lz:if="{{srvProperty$spText}}">
				{{srvProperty$spText}}
			</lz:block>
			<lz:block lz:if="{{!srvProperty$spText}}">
		 	<textarea class="input wide"  id="spText" name="srvProperty.spText" rows="5">{{srvProperty.spText}}</textarea>
	 	 </lz:block>
	 	 
	 	 <em>请输入系统属性的文本</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{spText_readonly}}">
		 	<div class="state-input wide">
		 		<span>
		 	
			 {{lz.html(srvProperty.spText$||srvProperty.spText)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$spText}}
	{{lz.set("spStatus_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"spStatus"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"spStatus"))))}}
	{{lz.set("spStatus_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$spStatus}}
	<dl lz:if="{{spStatus_editable||spStatus_readonly}}" class="spStatus  " major  ref="spStatus">
		<dt>状　　态:</dt>
		<dd lz:if="{{spStatus_editable}}" input="select">
			<lz:block lz:if="{{srvProperty$spStatus}}">
				{{srvProperty$spStatus}}
			</lz:block>
			<lz:block lz:if="{{!srvProperty$spStatus}}">
		 	<select class="narrow" id="spStatus" name="srvProperty.spStatus">
		 		<option value="">请选择</option>
				<option value="1" selected='{{srvProperty.spStatus=="1"?"selected":""}}'>有效</option>
				<option value="0" selected='{{srvProperty.spStatus=="0"?"selected":""}}'>内容</option>
		 	</select>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择系统属性的状态</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{spStatus_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="spStatus">{{srvProperty.spStatus}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvProperty.spStatus$||srvProperty.spStatus)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$spStatus}}
			
			
			<div class="line">
				<center lz:if="{{edittype=='insert'}}">
					<a onclick="$('.ribs').show();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:inline;padding: 0px 15px;">点击展开更多编辑项</a>
					<a onclick="$('.ribs').hide();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:none;padding: 0px 15px;">点击收起更多编辑项</a>
				</center>
			</div>
			<center class="buttons">
				<input type="hidden" value="{{srvProperty.spId}}" name="srvProperty.spId" id="spId" />
			
			<lz:block lz:if="{{edittype=='insert'||edittype=='update'||edittype=='any'||edittype=='inport'}}">
				<button class="button" type="submit">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					保存&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
			
			<lz:block lz:if="{{edittype=='detail'}}">
				<button lz:if="{{canEdit}}" type="button" class="button" onclick='window.location.href="/admin/configurator/property.edit.html?edittype=update&id={{srvProperty.id}}"'>
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					修改&nbsp;&nbsp;</button>
				<button lz:if="{{canDel}}" type="button" class="button" onclick="deleteProperty('{{srvProperty.id}}','{{srvProperty.spName}}')">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					删除&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
					
			</center>
			<br/>

		</div>
	</div>
	<div class="foot"></div>		
</form>

 


<!------------------------VIEW_HTML_BOTTOM------------------------>
<!------------------------VIEW_HTML_BOTTOM------------------------>


</body>

<!------------------------VIEW_HTML_FOOTER------------------------>
<!------------------------VIEW_HTML_FOOTER------------------------>
<script>
	
	$(function(){
		if(parent.setit){
			parent.setit("/admin/configurator/property.edit.html",document.title,"/admin//images/icons/20088256421631277802.png");
		}
	});
	
	function cancel(){
		if(parent.closeHref){
			parent.closeHref("/admin/configurator/property.edit.html");
		}else{
			$.closeModalDialog();
		}
	}


	/**
	* 删除系统属性
	**/
	function deleteProperty(id,flag)
	{
		var dialog=top.$.dialog({
				html:"<span style='white-space:nowrap;'>确定要删除当前数据吗？</span>",
				title:"删除系统属性",
				modal: true,			
				onOk:function(){
					dialog.closeDialog();
					var url = "/admin/configurator/property.delete.do";
					var params = {id:id};
					var protocol = $.getAjax(url,params);
					if(protocol.message){
						top.$.toast(protocol.message);
					}
					if(protocol.success){
						caller.location.href=caller.location.href;		
					}
				}
		 });	
	}
</script>
</html>